<template>
  <div>
    <van-nav-bar
      title="设置密码"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <van-form @submit="onSubmit">
      <van-field
        v-model="register.password"
        type="password"
        name="密码"
        placeholder="请输入密码"
        :rules="[{ required: true, message: '请填写密码' }]"
      />
      <van-field
        v-model="register.password"
        type="password"
        name="密码"
        placeholder="请输入密码"
        :rules="[{ required: true, message: '请填写密码' }]"
      />
      <van-button round block type="info" native-type="submit">
        登录
      </van-button>
    </van-form>
  </div>
</template>

<script>
import { lzlogin,lzpassword} from "../../utils/http";
export default {
  name: "",
  components: {},
  props: [],
  data() {
    return {
      register: {
        mobile: "19801237380",
        password: "",
        sms_code: "",
        sms_type: "getPassword",
        type: 1,
        client: 1,
      },
    };
  },
  mounted() {
    // console.log(this.$route.query.list);
    // let list = this.$route.query.list;
    // this.register = list;
    // console.log(this.register);
  },
  methods: {
    onClickLeft() {
      this.$router.push("/login");
    },
    async onSubmit(values){
        console.log(this.register);
      console.log(this.register.password);
      const res = await lzlogin(this.register);
      console.log(res);
    },
  },
  computed: {},
  watch: {},
  created() {},
};
</script>

<style scoped>
</style>
\